home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / Tutorial / Cookbook / 06.slider / MyView.m < prev    next >
Text File  |  1995-06-12  |  479b  |  31 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import "MyView.h"
  5. #import <dpsclient/wraps.h>
  6. #import <appkit/Control.h>
  7.  
  8. @implementation MyView
  9.  
  10. - mySlider:sender
  11. {
  12.     myFloat = [sender floatValue];
  13.     [self display];
  14.     return self;
  15. }
  16.  
  17. - drawSelf:(NXRect*)r :(int)c
  18. {
  19.     NXEraseRect(&bounds);
  20.     PSsetgray(NX_BLACK);
  21.     PSsetlinewidth(5.0);
  22.     PSnewpath();
  23.     PSmoveto(bounds.size.width/2.0, 10.0);
  24.     PSlineto(myFloat*1.5, myFloat);
  25.     PSstroke();
  26.     return self;
  27. }
  28.  
  29.  
  30. @end
  31.